package com.StarStudio.Service;

import com.ruoyi.common.core.Entity.CouponsStock;
import com.ruoyi.common.core.Entity.Result;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@Service
@FeignClient(value = "CouponsStock")
public interface CouponsStockService {

    @PostMapping("/post")
    Result addCouponsStock(@RequestBody CouponsStock couponsStock);

    @PutMapping("/put")
    Result updateCouponsStock(@RequestBody CouponsStock couponsStock);

    @RequestMapping("/UnsoldItemIds/{id}")
    List<Long> findUnsoldItemIdsByCouponsId(@PathVariable(value = "id") long id);

    @RequestMapping("/realDelete/{id}")
    void realDelete(@PathVariable(value = "id") long id);

    @RequestMapping("/updateDelFlag/{id}")
    void updateDelFlag(@PathVariable(value = "id") long id);

    @RequestMapping("/SoldItemIds/{id}")
    List<Long> findSoldItemIdsByCouponsId(@PathVariable(value = "id") long id);

    @RequestMapping("/CouponsStockIds/{couponsId}")
    List<Long> findCouponsStockIds(@PathVariable(value = "couponsId") long couponsId);
}
